package feizhou.consumerdemo.business.feign.fallback;

import feizhou.consumerdemo.business.bean.User;
import feizhou.consumerdemo.business.feign.UserFeign;
import org.springframework.stereotype.Component;

@Component
public class UserFeignFallback implements UserFeign {
    @Override
    public User queryById(Long id) {
        User user = new User();
        // -2L 表示错误的id
        user.setId(-2L);
        user.setNote("UserFeignFallback网络不好");
        return user;
    }
}
